package ir.values.users.instructions;

import frontend.visitor.symboltbl.scope.Scope;
import ir.types.Type;
import ir.values.users.User;

public abstract class Instruction extends User {
    public Instruction(String originalName, Type type) {
        super(originalName, type);
    }
    public abstract InstOperator getInstOperator();
    public boolean shouldGenerateId() {
        return true;
    }
    @Override
    public String parseUsingName() {
        if (shouldGenerateId()) {
            return "%" + id;
        } else {
            return null;
        }
    }
}
